<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Hello World</title>
    <script charset="UTF-8" src="js/vue.js"></script>
</head>
<body>
    <div id="root">
        <div @click="handleClick">{{message}}</div>
        <item></item>
    </div>
<script>
    Vue.component('item',{
        template: '<div>hello item</div>'
    });
    let vm = new Vue({
       el:'#root',
       data:{
            message:'hello world'
       },
        methods:{
           handleClick:function () {
               alert('hello');
           }
        }
    });
</script>
</body>
</html>